﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Entity = SoTaiChinh.Library.Entity;
using Business = SoTaiChinh.Library.Business;

public partial class templates_client_usercontrols_advertisement : System.Web.UI.UserControl
{
    DataTable dsQuangCao = new DataTable();
    Entity.ViTriBanner entityViTriBanner = new Entity.ViTriBanner();
    Business.ViTriBanner businessViTriBanner = new Business.ViTriBanner();

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            LoadQuangCao();
        }
    }
    protected void LoadQuangCao()
    {
        try
        {
            entityViTriBanner.TenViTri = "Quảng cáo";
            dsQuangCao = businessViTriBanner.SelectByTenViTriBannerTemplates(entityViTriBanner);
            rptQuangCao.DataSource = dsQuangCao;
            rptQuangCao.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}
